<div class="container">
<div class="row" style="height: 100px;">
<br>
 </div>
	<div  style="background-color: #F6F6F6; padding: 10px;">
		<div style="background-color: #FFFFFF;">
			<?php if(!empty($categorias)){ ?>
			
			<div class="btn-group">
		      <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Categoria 
		      <span class="caret"></span></button>
		      <ul class="dropdown-menu" role="menu">
		      		<?php 		foreach ($categorias as $categoria){  ?>
		      	  <li><a href="?action=categoria&status=0&id=<?php echo $categoria["id"];?>"><?php echo $categoria["nome"]; ?></a></li>
		       <?php } ?>
		      </ul>
		    </div>
		   <?php  }?>
		   <br>
			<table id="tableId" class="table table-bordered table-striped  table-hover ">
				<thead>
					<tr>
						<th>Tarefa</th>
						<th>T&iacute;tulo</th>
						<th>Data</th>
						<th>Categoria</th>
						<th>Status</th>
						<th>*</th>
						
					</tr>
				</thead>
				<tbody>
					<?php if(!empty($tarefas)){
							foreach ($tarefas as $tarefa){
								$status = $Tarefa->checkStatus($tarefa["lida"],$tarefa["concluida"]);
					?>
					<tr>
						<td><?php echo $tarefa["id"]; ?></td>
						<td><?php echo $tarefa["titulo"]; ?></td>
						<td><?php echo $tarefa["data"]; ?></td>
						<td><?php echo $tarefa["categoria"]; ?></td>
						<td id="status-<?php echo $tarefa["id"];?>" class="<?php echo $status["cor"]; ?>"><?php echo $status["status"]; ?></td>
						<td><a style="cursor: pointer;" class="btn btn-default btn-sm" id="concluido-<?php echo $tarefa["id"];?>" onclick="concluido('<?php echo $tarefa["id"];?>')" ><span class="glyphicon glyphicon-ok"></span> </a></td>
					</tr>
					<?php }//for   
					}//if?>
				</tbody>
			</table>
		</div>
	</div>
</div>